﻿@using ZhouYu.DreamTour.Web.Models;
@using ZhouYu.DreamTour.Model;
@{
    var UserInfo = UserInfoContext.userInfoContext.UserInfo;
    var user = ViewBag.UserId as Custompoints;
}

<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>中国梦想游-会员登录页</title>
    <link href="~/css/style.css" rel="stylesheet" type="text/css" />
    <link href="~/css/common.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="~/layui-v2.5.4/layui/css/layui.css" />
    <script src="~/js/jquery-3.3.1.min.js"></script>
    <script src="~/layui-v2.5.4/layui/layui.js"></script>
    <script src="~/js/Format.js" type="text/javascript"></script>
    <style>
        * {
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div class="top_hw clearfix">
        <div class="top_h clearfix">
            <div class="top_hl"><span>欢迎来到中国梦想游，让你的梦想全程免费自由行！</span> 预定热线：<b>0571-63322269</b></div>
            <div class="top_hr">
                @if (UserInfo == null)
                {
                    <a href="/Home/User_Register">会员注册</a>
                    <span>|</span> <a href="/Home/User_Login">登录</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a>
                    @*<a>
                欢迎你，来到新世界旅行网！
            </a>*@
                }
                else
                {
                    <a href="/Home/User_Center">会员中心</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a> <span>|</span> <a href="/Login/LoginOut">退出</a> <span>|</span>
                    <a>
                        欢迎你，<span>@UserInfo.User_Name</span>来到新世界旅行网！
                    </a>
                }
            </div>
        </div>
    </div>
    <div class="head_w">
        <div class="head_t clearfix">
            <div class="logo"><img src="~/images/logo.jpg"></div>
            <div class="rx_line"><img src="~/images/rx.jpg"></div>
        </div>
    </div>
    <div class="mainNav clearfix">
        <ul class="Nav_ul">
            <li><a href="/Home/Index">首页</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Route">旅游路线</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Scenic">旅游景点</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/CateringAccommodation">餐饮住宿</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Traffic_DatailsOne">交通线路</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Group">旅游团购</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Specialty">地方特产</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/AutoGenerationIntro">自动生成简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Team_Join">团队简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Itinerary_Details">行程导航</a></li>
        </ul>
    </div>
    <div class="b_wrap">
        <div class="current"><span>当前所在地：</span><a href="/Home/Index">首页</a> >> <a href="/Home/User_Center">会员中心</a></div>
        <div class="fmember">
            <div class="fmleft">
                <div class="fmleft_top"><img src="~/images/fmbt1.png" border="0"></div>
                <div class="fmlist">
                    <ul>
                        <li class="f1">订单中心</li>
                        <li> >><a href="/Home/User_Order">我的订单</a> </li>
                        <li> >><a href="/Home/User_Colleague">发布结伴同行</a> </li>
                        <li> >><a href="/Home/User_Apply">我申请的结伴同行</a> </li>
                        <li> >><a href="/Home/User_Comment">我的点评</a> </li>
                        <li class="f2"> >><a href="/Home/User_Questions">我的提问</a> </li>
                    </ul>
                    <ul>
                        <li class="f1">我的优惠卡券</li>
                        <li> >><a href="/Home/User_CashAccount">现金账号</a> </li>
                        <li> >><a href="/Home/User_AllowanceVol">抵用券</a> </li>
                        <li class="f2"> >><a href="/Home/User_TouristVol">旅游券</a> </li>
                    </ul>
                    <ul>
                        <li class="f1">账户信息</li>
                        <li> >><a href="/Home/User_Data">个人资料</a> </li>
                        <li> >><a href="/Home/User_AccountSecurity">账户安全</a> </li>
                        <li>
                            >>
                            <a href="/Home/User_Bank">我的银行卡</a>
                        </li>
                        <li> >><a href="/Home/User_Integral">我的积分</a> </li>
                        <li> >><a href="/Home/User_UpdatePwd">修改密码</a> </li>
                        <li class="f2"> >><a href="/Home/User_Address">配送地址</a> </li>
                    </ul>
                </div>
            </div>
            <div class="fmright">
                <div class="fmr1">
                    <div class="fmr1_top">我的积分</div>
                    <div class="fmr1_m">
                        <div class="ftx">
                            @if (user != null)
                            {
                                <div class="fjf">
                                    您当前的积分：<a href="#">@user.Integral_balance</a><br>
                                    <input type="image" src="~/images/fbtn5.png">
                                </div>
                            }
                            else
                            {
                                <div class="fjf">
                                    您当前的积分：<a href="#">0</a><br>
                                    <input type="image" src="~/images/fbtn5.png">
                                </div>
                            }
                        </div>
                        <div class="fjfr">
                            积分规则<br>
                            1. 获得之日起两年有效，过期积分将在到期当月月底清除，积分过期后将不能使用，如2010年9月1日获得100积分，其将
                            在2012年9月30日失效。<br>
                            2. 积分兑换比例：100积分=1块钱旅游券。
                        </div>
                        <div class="fmyor">
                            <ul>
                                <li class="f2">积分记录</li>
                                <li>积分兑换</li>
                            </ul>
                        </div>
                        <div class="fjfr">
                            按日期查询：<input type="text" class="finput4" id="Createtime">&nbsp;-&nbsp;<input type="text" id="Effective" class="finput4">&nbsp;&nbsp;<input type="image" id="btn" src="~/images/fbtn6.png" align="absmiddle">
                        </div>
                        <div class="fjflist">
                            <table class="layui-hide" id="test" lay-filter="test"></table>



                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <script>
        //表格数据加载
    layui.use('table', function () {
        var table = layui.table;
        table.render({
            elem: '#test'
            , url: '/User/IntegralList?User_Id=' +@UserInfo.User_Id
            , cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            , cols: [[
                {
                    field: 'IntegralRecord_CreateTime', title: '获取日期', style: "font-size:11px;", templet: "<div>{{Format(d.IntegralRecord_CreateTime,'yyyy-MM-dd hh:mm:ss')}}</div>", align:'center' }
                , { field: 'IntegralRecord_Channel', title: '来源' ,align:'center',style:"font-size:11px;"}
                , { field: 'IntegralRecord_OperationMethod', title: '获取积分',align:'center' ,style:"font-size:11px;"}
                , { field: 'Integral_balance', title: '剩余积分',align:'center',style:"font-size:11px;" }
                , { field: 'IntegralRecord_Effective', title: '有效期至' ,style:"font-size:11px;", templet: "<div>{{Format(d.IntegralRecord_Effective,'yyyy-MM-dd hh:mm:ss')}}</div>",align:'center' }
            ]]
            ,id:'testReload'
        });

    });
    </script>
    <script>
        $(function () {
            $("#btn").click(function () {
                var table = layui.table;
                //获取查询值
                var createtime = $("#Createtime").val();

                var Effective = $("#Effective").val();
                table.reload('testReload', {
                    where: { //设定异步数据接口的额外参数，任意设
                        Createtime: createtime,
                        Effective: Effective
                    }
                });
            })

        })
    </script>
</body>
</html>

